﻿@page "{id:int}"
@using RazorPagesWebSite

@functions
{
    public UserModel UserModel { get; set; }

    [FromRoute]
    public int Id { get; set; }

    public async Task OnPost()
    {
        var user = new UserModel();

        Updated = await TryUpdateModelAsync(user);
        UserModel = user;
    }

    public bool Updated { get; set; }
}

@Html.ValidationSummary()
<form action="">
    @Html.AntiForgeryToken()    
</form>
Updated: @Updated
Name = @UserModel?.Name
